<template>
	<view>
		{{ $store.state.name }}-{{ $store.state.age }}
		<view class="">
			<button @click="add">修改年龄</button>
		</view>
	</view>
	
</template>

<script>

	export default {
		data() {
			return {
				
			}
		},
		mounted() {
			console.log(this);
		},
		methods: {
			add(){
				this.$store.commit('addAge')
			}
		}
	}
</script>

<style>

</style>
